package com.jic.interaction.ChinaPost.controller;
import com.jic.interaction.ChinaPost.model.vo.request.DamageRecallRequest;
import com.jic.interaction.ChinaPost.service.DamageRecallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/damageRecall")
@Api(tags = " [赔偿金]")
public class DamageRecallController {
    @Resource
    private DamageRecallService damageRecallService;


    @ApiOperation(value = "赔偿金撤回")
    @PostMapping("/getDamageRecall")
    @ResponseBody
    public String getDamageRecall(@RequestBody DamageRecallRequest request) throws Throwable{
       return damageRecallService.damageRecall(request);
    }

    @ApiOperation(value = "赔偿金退款")
    @PostMapping("/getDamageRefund")
    @ResponseBody
    public String getDamageRefund(@RequestBody DamageRecallRequest request) throws Throwable{
        return damageRecallService.damageRefund(request);
    }
}
